import request from "@/utils/request";

// 登錄
export function Login(data) {
  const params = { phone: data.phone, password: data.password };
  return request({
    url: "/login/cellphone",
    // url: "h ttps://autumnfish.cn/login/cellphone", http://123.207.32.32:9001
    method: "POST",
    params,
  });
}

// 退出登录
export function Logout() {
  return request({
    url: "/logout",
    method: "GET",
  });
}

// 二维码key
export function Qrkey(params) {
  return request({
    url: "/login/qr/key",
    method: "GET",
    params
  });
}
// 生成二维码
export function CreateQCode(params) {
  return request({
    url: "/login/qr/create",
    method: "GET",
    params
  });
}

// 二维码扫码状态
export function ScanQCode(params) {
  return request({
    url: "/login/qr/check",
    method: "GET",
    params
  });
}
// 获取登录状态
export function GetLoginStatus(data) {
  return request({
    url: `/login/status?timestamp=${new Date().getTime()}`,
    method: "POST",
    data
  });
}
// 获取账号信息

